# -*- coding: utf-8 -*-
from datetime import timedelta
from airflow.operators.bash import BashOperator
from jms_dm_todo.doris.dm_frm_network_summary_month_dt import doris_jms_dm__dm_frm_network_summary_month_dt
from jms_dm_todo.doris.dm_frm_network_summary_week_dt import doris_jms_dm__dm_frm_network_summary_week_dt
from jms_dm_todo.oracle.dim_frm_network_info_desc import jms_oracle__dim_frm_network_info_desc
from jms_dm_todo.doris.dim_frm_network_desc import jms_dim__dim_frm_network_desc
from jms_dm_todo.doris.dm_frm_network_summary_dt import doris_jms_dm__dm_frm_network_summary_dt

jms_dm__dm_frm_network_summary_monitor_dt = BashOperator(
    pool='unlimited_pool',
    task_id="jms_dm__dm_frm_network_summary_monitor_dt",
    bash_command='jms_dm_todo/dm/dm_frm_network_summary_monitor_dt/execute.sh',
    execution_timeout=timedelta(minutes=15),
    # 邮箱更换
    email=['jokic.wang@jtexpress.com', 'yl_bigdata@yl-scm.com'],
    retries=2,
)


jms_dm__dm_frm_network_summary_monitor_dt << [
    doris_jms_dm__dm_frm_network_summary_dt,
    doris_jms_dm__dm_frm_network_summary_month_dt,
    doris_jms_dm__dm_frm_network_summary_week_dt,
    jms_oracle__dim_frm_network_info_desc,
    jms_dim__dim_frm_network_desc
]
